/**
 * 接口api
 */
import axios from 'axios';
import addInterceptors from './instance';
import baseURL from '../config';

import bootstrapMock from './mock';

export const instance = axios.create({
  baseURL: baseURL.url_yuheng,
  withCredentials: true,
});

addInterceptors(instance);

/**
 * mock开关
 */
bootstrapMock(instance);

export const userData = {
  getCurrentUserInfo() {
    return instance.get('/corp/getcurrentUserInfo');
  },
};
